package ysm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ysm.entity.Notice;
import ysm.mapper.NoticeMapper;

@Service
public class NoticeService {
	
	@Autowired
	private NoticeMapper noticeMapper;
	
	public void insert(Notice record) {
		noticeMapper.insert(record);
	}
	
	public List loadAllNotice() {
		return noticeMapper.selectAll();
	}
	
	public void changeIsshow(Notice record) {
		noticeMapper.updateByPrimaryKey(record);
	}
	
	public void deleteByPrimaryKey(Integer id) {
		noticeMapper.deleteByPrimaryKey(id);
	}
	
	public void addNotice(Notice record) {
		noticeMapper.insert(record);
	}
}
